package com.itheima01;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class Test02 {
    public static void main(String[] args) throws InterruptedException {
        ExecutorService executorService = Executors.newCachedThreadPool();
        executorService.submit(()->{
            System.out.println(Thread.currentThread().getName()+"线程启动了");
        });

        Thread.sleep(100);
        executorService.submit(()->{
            System.out.println(Thread.currentThread().getName()+"线程启动了");
        });


        executorService.shutdown();
    }
}
